package com.yxhl.zoume.data.http.rest.param.specialcar;

import com.yxhl.zoume.data.http.rest.param.base.BaseRequestParam;


public class SpecialCarOrderParam extends BaseRequestParam {


    /**
     * amount : 1
     * startCode : 430903
     * bizType : 3
     * clientSystem : android
     * departTime : 2016-04-09 17:00
     * elat : 28.193502
     * elng : 113.220041
     * end : 长沙黄花国际机场
     * endCityCode : 430121
     * lat : 28.538725
     * lng : 112.341766
     * needFerry : false
     * src : online
     * start : 益阳站
     */

    /**
     * 出发地
     */
    private String start;

    /**
     * 出发地的区域码(从地图中获知)
     */
    private String startCode;

    /**
     * 出发地纬度
     */
    private String lat;

    /**
     * 出发地经度
     */
    private String lng;

    /**
     * 目的地
     */
    private String end;

    /**
     * 目的地编码
     */
    private String endCityCode;

    /**
     * 目的地纬度
     */
    private String elat;

    /**
     * 目的地经度
     */
    private String elng;

    /**
     * 出发时间
     */
    private String departTime;

    /**
     * 乘车人数
     */
    private int amount;

    /**
     * 订单类型
     */
    private int bizType;

    /**
     * 支付方式: online
     */
    private String src = "online";

    /**
     * 是否需要接驳车
     */
    private boolean needFerry;

    /**
     * android / ios
     */
    private String clientSystem;

    public SpecialCarOrderParam() {
    }

    public SpecialCarOrderParam(String mobile, String token, int amount) {
        super(mobile, token);
        this.amount = amount;
    }

    public SpecialCarOrderParam(String mobile, String token,
                                String start, String startCode, String lat, String lng,
                                String end, String endCityCode, String elat, String elng,
                                String departTime, int amount, int bizType, String src,
                                boolean needFerry) {
        super(mobile, token);
        this.start = start;
        this.startCode = startCode;
        this.lat = lat;
        this.lng = lng;
        this.end = end;
        this.endCityCode = endCityCode;
        this.elat = elat;
        this.elng = elng;
        this.departTime = departTime;
        this.amount = amount;
        this.bizType = bizType;
        this.src = src;
        this.needFerry = needFerry;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public String getStartCode() {
        return startCode;
    }

    public void setStartCode(String startCode) {
        this.startCode = startCode;
    }

    public int getBizType() {
        return bizType;
    }

    public void setBizType(int bizType) {
        this.bizType = bizType;
    }

    public String getClientSystem() {
        return clientSystem;
    }

    public void setClientSystem(String clientSystem) {
        this.clientSystem = clientSystem;
    }

    public String getDepartTime() {
        return departTime;
    }

    public void setDepartTime(String departTime) {
        this.departTime = departTime;
    }

    public String getElat() {
        return elat;
    }

    public void setElat(String elat) {
        this.elat = elat;
    }

    public String getElng() {
        return elng;
    }

    public void setElng(String elng) {
        this.elng = elng;
    }

    public String getEnd() {
        return end;
    }

    public void setEnd(String end) {
        this.end = end;
    }

    public String getEndCityCode() {
        return endCityCode;
    }

    public void setEndCityCode(String endCityCode) {
        this.endCityCode = endCityCode;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLng() {
        return lng;
    }

    public void setLng(String lng) {
        this.lng = lng;
    }

    public boolean isNeedFerry() {
        return needFerry;
    }

    public void setNeedFerry(boolean needFerry) {
        this.needFerry = needFerry;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public String getStart() {
        return start;
    }

    public void setStart(String start) {
        this.start = start;
    }

    @Override
    public String toString() {
        return "SpecialCarOrderParam{" +
                "start='" + start + '\'' +
                ", startCode='" + startCode + '\'' +
                ", lat='" + lat + '\'' +
                ", lng='" + lng + '\'' +
                ", end='" + end + '\'' +
                ", endCityCode='" + endCityCode + '\'' +
                ", elat='" + elat + '\'' +
                ", elng='" + elng + '\'' +
                ", departTime='" + departTime + '\'' +
                ", amount='" + amount + '\'' +
                ", bizType=" + bizType +
                ", src='" + src + '\'' +
                ", needFerry=" + needFerry +
                ", clientSystem='" + clientSystem + '\'' +
                '}';
    }

    public boolean checkData() {
        if (start == null || start.length() <= 0) {
            return false;
        }
        if (startCode == null || startCode.length() <= 0) {
            return false;
        }
        if (lat == null || lat.length() <= 0) {
            return false;
        }
        if (lng == null || lng.length() <= 0) {
            return false;
        }
        if (end == null || end.length() <= 0) {
            return false;
        }
        if (endCityCode == null || endCityCode.length() <= 0) {
            return false;
        }
        if (elat == null || elat.length() <= 0) {
            return false;
        }
        if (elng == null || elng.length() <= 0) {
            return false;
        }
        if (departTime == null || departTime.length() <= 0) {
            return false;
        }

        return true;
    }
}
